package com.probox.common.core.utils;


public class NumberUtil {
    public static String format(Long num){
        String rst = "0";
        if (num != null && num>0){
            if (num>=100000){
                rst = "10万+";
            }else if (num>=10000){
                rst =  cn.hutool.core.util.NumberUtil.decimalFormat("#.#",num/10000.0)+"万";
            }else if (num>=1000){
                rst =  cn.hutool.core.util.NumberUtil.decimalFormat("#.#",num/1000.0)+"千";
            }else{
                rst = String.valueOf(num);
            }
        }
        return rst;
    }
}
